<?php
class AuctionModule
{
	public function index()
	{
		global $_FANWE;
		
		$cache_args = array(
			$id,
			trim($_FANWE['request']['city']),
			$_FANWE['page']
		);
		
		$cache_file = getTplCache('page/auction_index',$cache_args);
		if(!@include($cache_file))
		{
			$_FANWE['nav_title'] = lang('common','auction_index');
			include template('page/auction_index');
		}
		
		display($cache_file);
	}
	
	public function show()
	{
		global $_FANWE;
		$id = intval($_FANWE['request']['id']);
		if($id == 0)
			fHeader('location:./');
			
		$cache_args = array(
			$id,
		);
		
		$cache_file = getTplCache('page/auction_show',$cache_args);
		if(!@include($cache_file))
		{
			$auction = S('auction')->getItem($id);
			if(!$auction)
				fHeader('location:./');
				
			$_FANWE['nav_title'] = $auction['name'].'-'.lang('common','auction_index');
			include template('page/auction_show');
		}
		
		display($cache_file);
	}
}
?>